package com.easyjava.builder;

import com.easyjava.utils.DateUtils;

import java.io.BufferedWriter;
import java.io.IOException;
import java.util.Date;

/**
 * @projectName: easyjava
 * @author: Li
 * @description:
 */

public class BuildComment {
    public static void createClassComment(BufferedWriter bw, String classComment) throws IOException {
        bw.write("/**");
        bw.newLine();
        bw.write(" * @description: " + classComment);
        bw.newLine();
        bw.write(" * @date: " + DateUtils.format(new Date(), DateUtils.YYYY_MM_DD));
        bw.newLine();
        bw.write(" */");
    }

    public static void createFieldComment(BufferedWriter bw, String filedComment) throws IOException {
        bw.write("\t/**");
        bw.newLine();
        bw.write("\t * " + (filedComment == null ? "" : filedComment));
        bw.newLine();
        bw.write("\t */");
    }

    public static void createMethodComment(BufferedWriter bw, String comment) {

    }
}
